<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<base href="<%=request.getContextPath()%>/"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/bootstrap.min.css">  
	<script src="js/jquery.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
<title>Insert title here</title>
</head>
<body>
	<nav class="navbar navbar-default" role="navigation">
		<div class="container-fluid"> 
			<div class="navbar-header">
				<a class="navbar-brand" >欢迎您!</a>
				<a class="navbar-brand" href="#">${currentUser.trueName}</a>
				<a class="navbar-brand btn btn-info btn-sm" href="blog/preAdd">添加</a>
			</div>
			<div>
				<form class="navbar-form navbar-left" role="search">
					<div class="form-group">
						<input type="text" class="form-control" placeholder="Search">
					</div>
					<button type="submit" class="btn btn-default">提交</button>
				</form>
			</div>
		</div>
	</nav>
	
	<c:forEach var="blog" items="${list }">
		<table class="table table-striped">
				<tbody>
					<tr>
						<td><a class="btn btn-info btn-sm" href="blog/detail/${blog.blogId }">详情</a></td>
						<td>${blog.user.trueName }</td>
						<td>${blog.createTime }</td>
						<td>
						<a class="btn btn-warning" href="blog/preUpdate/${blog.blogId }">修改</a>   
						<a class="btn btn-danger" href="blog/delete/${blog.blogId }">删除</a>
						</td>
					</tr>
				</tbody>
		</table>
	</c:forEach>
</body>
</html>